package com.wee.model;

/**
 * Created by xiaobing on 15/7/26.
 */

/**
 * Created by xiaobing on 15/7/19.
 */
public class UserSingle {
   /* String user_s = "user_json";
    private User user;
    private static UserSingle instance = null;
    private UserSingle(){}
    public synchronized static UserSingle getInstance(){
        if(instance == null){
            instance = new UserSingle();
        }
        return instance;
    }

    public User getUser(Context context) {
        if(user==null){
            String json = SharedPreferencesUtil.get(context, user_s);
            user = new Gson().fromJson(json, User.class);
        }
        return user;
    }

    public void setUser(Context context, User user) {
        if(user!=null){
            String json = new Gson().toJson(user, User.class);
            SharedPreferencesUtil.set(context, user_s, json);
        }
        this.user = user;
    }*/
}